home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 47 / Amiga Format AFCD47 (Issue 131, Xmas 1999).iso / -serious- / misc / football_upd / exec / scheduler.rexx < prev    next >
OS/2 REXX Batch file  |  1999-10-04  |  23KB  |  704 lines

  1. /* ***********************************************************************
  2.  
  3.    SCHEDULER PROGRAM FOR FOOTBALL REXX SUITE
  4.   -------------------------------------------
  5.                    Copyright  Mark Naughton 1996
  6.  
  7.  
  8. Version    Date     History
  9. --------------------------------------------------------------------------
  10.  1.0       090996   First release.
  11.            180996   Changed record-count so that it is stored in element
  12.                     zero of each array. Deleted some variable assigns
  13.                     that weren't needed. Amended reading into arrays so
  14.                     that the count is set correctly for one element.
  15.                     Removed all "call "references before library routines.
  16.            270996   Added code to sort 'Teams.df' and to recreate it.
  17.                     Changed a few messages and tidied up.
  18.            ******   Decided not to store goalscorers. Was not viable as
  19.                     too much data would have to be collected.
  20.            270996   Added code for points_per_draw and points_per_loss.
  21.                     Now uses DOS Delete command, not the support function.
  22.                     Amended reading in of teams - quicker, tidier. Added
  23.                     code to display a report on the league. Updated to
  24.                     use new filenames. Improved error messages. Added
  25.                     error check for more than 1000 matches.
  26.  1.1       131196   Added argument so it can become a component of
  27.                     FOOTBALL. Removed all messages. Added checks for
  28.                     files - if not found, exits without a message.
  29.                     Rewrote report.
  30.            201196   Added code to store relegation. All this will do is
  31.                     display a line across the league table. Amended msg
  32.                     for play_each_other. Added code to allow teams to
  33.                     play each other more than twice.
  34.            201196   Decided not to implement PreviousPosition as it would
  35.                     require file changes and a reformat of the league
  36.                     table. It may be implemented soon though.
  37.            211196   Updated and tidied the display.
  38.            201296   Fixed bug where if the number of times that each team
  39.                     play each other is an even number, then its not set
  40.                     to the correct value (only works for odd matches).
  41.            110197   Blanks are now removed from the filename, before
  42.                     creation.
  43.  1.2       110497   Added code to support Points_Per_Goals.
  44.  2.0       010997   Have been working on Scheduling for about a week. Put
  45.                     in code and now ready to test.
  46.            030997   Problem with format of '.sf' file - fixed. Program
  47.                     failed due to missing 'do' - fixed. All works.
  48.            050997   Added extra '*' at end of '.sf' file in line with
  49.                     manual created one.
  50.            070997   Fixed bug for AUTOSCHED - no. of matches in report was
  51.                     wrong - needed to be reset before the loop.
  52.            220997   Added code for promotion and divisions.
  53.            240997   Removed all data such as teams count, points per win,
  54.                     relegation etc, as they are already stored in '.df'.
  55.            250997   Wasn't creating the files - traced to resetting the
  56.                     strings that were used to pick the number of divisions
  57.                     and the divisions themselves, to the variables that
  58.                     are used as the assignments/counters. Made amendments
  59.                     to display of the report.
  60.            151297   Tidied display.
  61.            240898   Amended code that regenerates .df file as it was
  62.                     adding two blank lines before the teams and causing
  63.                     it to fail.
  64.            210499   Scheduler now tidies up previous files, ie. deleting
  65.                     a '.sflearn' file from a previous league.
  66.  2.1       050599   Added code to check the schedule file to see if it
  67.                     contains enough matches for the league to be played
  68.                     with the specified settings. Added support for playing
  69.                     teams an odd number of times and for schedules with
  70.                     teams playing it each other more than twice.
  71.                     Enhanced a few messages.
  72.  2.2       160699   Added code to support creation of '.stats' files. Fixed
  73.                     bug where Scheduler wouldn't allow 4 teams, 6 matches
  74.                     as it calculated it to 12 matches (World Cup) - amended
  75.                     if the number of matches is half that 'meant' to be
  76.                     played.
  77.  
  78. **************************************************************************
  79.  
  80. Procedure
  81. ---------
  82.  
  83. 1. Check files exist.
  84. 2. Read 'Teams.df' and write teams to output file.
  85. 3. If AutoSched is specified then store parameters.
  86. 4. Using external program, sort the teams.
  87. 5. Re-read the teams and recreate 'Teams.df'.
  88. 6. Open 'Teams.df' for reading.
  89. 7. Extract data and store.
  90. 8. If no separator in it, then take it as a
  91.    team. Strip blanks and store.
  92. 9. Close input file.
  93. 10.IF AUTOMATIC - Read specified schedule file.
  94. 11.Read schedules and store dates/weeks.
  95. 12.Give error if the number of teams does not equal
  96.    the number of lines in the schedule file.
  97. 13.Write the dates/weeks to a file then use an
  98.    external program to sort them, writing back to the file.
  99. 14.Read dates into array and delete file.
  100. 15.Format dates array with season start date.
  101. 16.Format and write '.sf' files.
  102. 17.IF MANUAL - Open 'Teams.sf' file.
  103. 18.Write league name to it.
  104. 19.Loop and write all teams with a schedule of
  105.    all other teams. Number of matches is stored.
  106. 20.Close output file.
  107. 21.Open 'Teams.stats' for writing.
  108. 22.Write all data such as PLAYED,WIN,DRAW,LOST,GOALS_FOR,GOALS_AGAINST and
  109.    POINTS for each team.
  110. 23.Close file. Delete file (if found).
  111. 24.Create a report on the league created and then exit.
  112.  
  113. ************************************************************************** */
  114. PARSE ARG league_file
  115.  
  116. version      = 2
  117. league_file  = "Data/" || strip(league_file)
  118. input_file   = '.df'
  119. output_file  = '.sf'
  120. output2_file = '.stats'
  121. output3_file = '.temp'
  122. delput_file  = '.sflearn'
  123. title        = '*LEAGUE_NAME='
  124. points_win   = '*POINTS_PER_WIN='
  125. points_drw   = '*POINTS_PER_DRW='
  126. points_lse   = '*POINTS_PER_LSE='
  127. points_gls   = '*POINTS_PER_GLS='
  128. releg        = '*RELEGATION='
  129. playother    = '*PLAY_OTHER='
  130. promoted     = '*PROMOTED='
  131. num_divs     = '*NUM_DIVISIONS='
  132. divisions    = '*DIVISIONS='
  133. pkauthor     = '*  Author ='
  134. pkversion    = '*  Version='
  135. separator    = '*'
  136. teams.       = '???'
  137. tcount       = 0
  138. ttc          = 0
  139. ptsgls       = 0
  140. input2_file  = '.schd'
  141. separator    = '*'
  142. not_played   = '__   __'
  143. dateweeks.   = '???'
  144. tdateweeks.  = '???'
  145. schedules2.  = '???'
  146. schedules4.  = '???'
  147. schedules6.  = '???'
  148. schedules8.  = '???'
  149. schedules0.  = '???'
  150. months       = "January February March April May June July August September October November December"
  151. autosched    = "*AUTOSCHD="
  152. autos        = 0
  153. ndivs        = 0
  154. promo        = 0
  155. divs         = ''
  156. oddnums      = "1 3 5 7 9"
  157.  
  158.  
  159. if exists(league_file || input_file) = 0 then exit
  160.  
  161. tcount = 0
  162. if open(datafile,league_file || input_file,'r') then do
  163.    if open(datafile2,league_file || output3_file,'w') then do
  164.       do while ~eof(datafile)
  165.          line = readln(datafile)
  166.          line = strip(line)
  167.          if pos(separator,line) > 0 & line ~='' then do
  168.             if pos(autosched,line) > 0 then do
  169.                autofile = delstr(line,1,10)
  170.                autos = 1
  171.             end
  172.             tcount = tcount + 1
  173.             teams.tcount = line
  174.          end
  175.          else do
  176.             ttc = ttc + 1
  177.             writeln(datafile2,line)
  178.          end
  179.       end
  180.       close(datafile2)
  181.    end
  182.    else do
  183.       say
  184.       say "ERROR :    (Scheduler)"
  185.       say
  186.       say "Cannot write to '"league_file||output3_file"'."
  187.       close(datafile)
  188.       exit
  189.    end
  190.    close(datafile)
  191. end
  192. else do
  193.    say
  194.    say "ERROR :    (Scheduler)"
  195.    say
  196.    say "Cannot open '"league_file || input_file"' for reading/sorting."
  197.    exit
  198. end
  199.  
  200. address command 'sort 'league_file || output3_file league_file || output3_file
  201.  
  202. if open(datafile2,league_file || output3_file,'r') then do
  203.    if open(datafile,league_file || input_file,'w') then do
  204.       do i=1 to tcount
  205.          if teams.i ~= '' then
  206.             writeln(datafile,teams.i)
  207.       end
  208.       do j=1 to ttc                   /* while ~eof(datafile2)  */
  209.          line = readln(datafile2)
  210.          line = strip(line)
  211.          if line ~= '' then do
  212.             if j = ttc then
  213.                writech(datafile,line)
  214.             else
  215.                writeln(datafile,line)
  216.          end
  217.       end
  218.       close(datafile)
  219.    end
  220.    else do
  221.       say
  222.       say "ERROR :    (Scheduler)"
  223.       say
  224.       say "Cannot write to '"league_file||input_file"'."
  225.       close(datafile2)
  226.       exit
  227.    end
  228.    close(datafile2)
  229. end
  230. else do
  231.    say
  232.    say "ERROR :    (Scheduler)"
  233.    say
  234.    say "Cannot open '"league_file || output3_file"' for reading/sorting."
  235.    exit
  236. end
  237.  
  238. address command 'delete >NIL: 'league_file || output3_file
  239.  
  240. tcount = 0
  241. if open(datafile,league_file || input_file,'r') then do
  242.    do while ~eof(datafile)
  243.       line = readln(datafile)
  244.       if pos(title,line) > 0 then        league_title = delstr(line,1,13)
  245.       if pos(pkauthor,line) > 0 then     author = delstr(line,1,12)
  246.       if pos(pkversion,line) > 0 then    fversion = delstr(line,1,12)
  247.       if pos(points_win,line) > 0 then   ptswin=delstr(line,1,16)
  248.       if pos(points_drw,line) > 0 then   ptsdrw=delstr(line,1,16)
  249.       if pos(points_lse,line) > 0 then   ptslse=delstr(line,1,16)
  250.       if pos(points_gls,line) > 0 then   ptsgls=delstr(line,1,16)
  251.       if pos(releg,line) > 0 then        reg = delstr(line,1,12)
  252.       if pos(playother,line) > 0 then    playo = delstr(line,1,12)
  253.       if pos(promoted,line) > 0 then     promo = delstr(line,1,10)
  254.       if pos(num_divs,line) > 0 then     ndivs = delstr(line,1,15)
  255.       if pos(divisions,line) > 0 then    divs  = delstr(line,1,11)
  256.       if pos(separator,line) = 0 then do
  257.          line = strip(line)
  258.          tcount       = tcount + 1
  259.          teams.tcount = line
  260.       end
  261.    end
  262.    close(datafile)
  263. end
  264. else do
  265.    say
  266.    say "ERROR :    (Scheduler)"
  267.    say
  268.    say "Unable to open '"league_file || input_file"' file."
  269.    exit
  270. end
  271.  
  272. if ndivs > 1 then do
  273.    if words(divs)+1 ~= ndivs then do
  274.       say
  275.       say "ERROR :    (Scheduler)"
  276.       say
  277.       say "The number of divisions specified does not match the"
  278.       say "number selected. The number of divisions specified"
  279.       say "must include the ones selected BUT also, the one that"
  280.       say "you are creating. ie, Three divisions specified, so you"
  281.       say "change the number of divisions to FOUR."
  282.       say
  283.       say "In this league that you have tried to create, you have specified"
  284.       say " "words(divs)" leagues but the number was set to "ndivs"."
  285.       say "The number should have been '"words(divs)+1"' leagues."
  286.       say
  287.       say "Schedule creation aborted."
  288.       say
  289.       say
  290.       say "The definition file, '"league_file || input_file"' has been created."
  291.       exit
  292.    end
  293.  
  294.    fd = 0
  295.    do i=1 to ndivs-1
  296.       if exists("Data/"||word(divs,i)||input_file) = 0 then do
  297.          if fd = 0 then do
  298.             say
  299.             say "ERROR :    (Scheduler)"
  300.             say
  301.          end
  302.          say "League '"word(divs,i)"' does not exist."
  303.          fd = fd + 1
  304.       end
  305.    end
  306.    if fd > 0 then do
  307.       say
  308.       say
  309.       say "The definition file, '"league_file || input_file"' has been created."
  310.       exit
  311.    end
  312. end
  313.  
  314.                                           /* Automatic Schedule creation */
  315. if autos = 1 then do
  316.    if exists("Data/"autofile||input2_file) = 0 then do
  317.       say
  318.       say "ERROR :    (Scheduler)"
  319.       say
  320.       say "Cannot find 'Data/"autofile||input2_file"'."
  321.       say
  322.       say
  323.       say "The definition file, '"league_file || input_file"' has been created."
  324.       exit
  325.    end
  326.  
  327.    ct = 0
  328.    sct2= 0
  329.    sct4= 0
  330.    sct6= 0
  331.    sct8= 0
  332.    sct0= 0
  333.    weeks = 0
  334.    dates = 0
  335.    sch = 1
  336.  
  337.    if open(datafile,"Data/"autofile||input2_file,'r') then do
  338.       mkct = ((tcount - 1) * playo) * (tcount/2)
  339.       kmct = 0
  340.       do while ~eof(datafile)
  341.          line = readln(datafile)
  342.          if line ~= '' & pos(separator,line) = 0 then do
  343.             counter = words(line)
  344.             do i=1 to counter
  345.                if word(line,i) ~= 0 then
  346.                   kmct = kmct + 1
  347.             end
  348.          end
  349.       end
  350.       close(datafile)
  351.    end
  352.    else do
  353.       say
  354.       say "ERROR :    (Scheduler)"
  355.       say
  356.       say "Cannot find 'Data/"autofile||input2_file"' for reading."
  357.       say
  358.       say
  359.       say "The definition file, '"league_file || input_file"' has been created."
  360.       exit
  361.    end
  362.  
  363.    mongoose = mkct / kmct
  364.  
  365.    if mkct ~= kmct & pos(".",mongoose) > 0 then do
  366.       say
  367.       say "ERROR :    (Scheduler)"
  368.       say
  369.       say "Scheduler has found that the schedule file 'Data/"autofile||input2_file"'"
  370.       say "does not contain the correct number matches for "tcount" teams to play each other"
  371.       say playo" times. It contains "kmct" matches, where as it should contain "mkct" matches."
  372.       say "You will have to edit the schedule file or change the settings required when"
  373.       say "recreating the league."
  374.       say
  375.       say
  376.       say "The definition file, '"league_file || input_file"', has been created."
  377.       exit
  378.    end
  379.  
  380.    if open(datafile,"Data/"autofile||input2_file,'r') then do
  381.       do while ~eof(datafile)
  382.          line = readln(datafile)
  383.          if pos("*WEEKS",line) then do
  384.             weeks=1
  385.          end
  386.          if pos("*DATES=",line) then do
  387.             startdate=substr(line,8,8)
  388.             dates = 1
  389.          end
  390.          if pos("*NEXT",line) > 0 then sch = sch + 1
  391.          if line ~= '' & pos(separator,line) = 0 then do
  392.             if sch = 1 then do
  393.                sct2 = sct2 + 1
  394.                schedules2.sct2 = line
  395.             end
  396.             if sch = 2 then do
  397.                sct4 = sct4 + 1
  398.                schedules4.sct4 = line
  399.             end
  400.             if sch = 3 then do
  401.                sct6 = sct6 + 1
  402.                schedules6.sct6 = line
  403.             end
  404.             if sch = 4 then do
  405.                sct8 = sct8 + 1
  406.                schedules8.sct8 = line
  407.             end
  408.             if sch = 5 then do
  409.                sct0 = sct0 + 1
  410.                schedules0.sct0 = line
  411.             end
  412.             counter = words(line)
  413.             do i=1 to counter
  414.                sdate = word(line,i)
  415.                if sdate = 0 then
  416.                   iterate
  417.                if ct = 0 then do
  418.                   ct = ct + 1
  419.                   dateweeks.ct = sdate
  420.                end
  421.                else do
  422.                   ij = 0
  423.                   do j=1 to ct
  424.                      if sdate = dateweeks.j then do
  425.                         ij = 1
  426.                         leave
  427.                      end
  428.                   end
  429.                   if ij = 0 then do
  430.                      ct = ct + 1
  431.                      dateweeks.ct = sdate
  432.                   end
  433.                end
  434.             end
  435.          end
  436.       end
  437.       close(datafile)
  438.    end
  439.    else do
  440.       say
  441.       say "ERROR :    (Scheduler)"
  442.       say
  443.       say "Cannot find 'Data/"autofile||input2_file"' for reading."
  444.       say
  445.       say
  446.       say "The definition file, '"league_file || input_file"', has been created."
  447.       exit
  448.    end
  449.  
  450.    sct = (sct2 + sct4 + sct6 + sct8 + sct0) / sch
  451.  
  452.    if counter ~= sct then do
  453.       say
  454.       say "ERROR :    (Scheduler)"
  455.       say
  456.       say "The schedule file specified only has "sct" scheduled"
  457.       say "teams whereas there are "counter" teams in the league."
  458.       say
  459.       say "Creation of files aborted. Re-specify correct schedule."
  460.       say
  461.       say
  462.       say "The definition file, '"league_file || input_file"', has been created."
  463.       exit
  464.    end
  465.  
  466.    if open(datafile2,"RAM:schd.temp",'w') then do
  467.       do j=1 to ct
  468.          writeln(datafile2,dateweeks.j)
  469.       end
  470.       close(datafile2)
  471.    end
  472.    else do
  473.       say
  474.       say "ERROR :    (Scheduler)"
  475.       say
  476.       say "Cannot create temporary file in RAM:."
  477.       say
  478.       say
  479.       say "The definition file, '"league_file || input_file"', has been created."
  480.       exit
  481.    end
  482.  
  483.    if weeks = 1 then
  484.       address command 'sort RAM:schd.temp RAM:schd.temp'
  485.    if dates = 1 then
  486.       address command 'Exec/SortWkDts'
  487.  
  488.    if open(datafile2,"RAM:schd.temp",'r') then do
  489.       do j=1 to ct
  490.          dateweeks.j = readln(datafile2)
  491.       end
  492.       close(datafile2)
  493.    end
  494.    else do
  495.       say
  496.       say "ERROR :    (Scheduler)"
  497.       say
  498.       say "Cannot find temporary file in RAM:."
  499.       say
  500.       say
  501.       say "The definition file, '"league_file || input_file"', has been created."
  502.       exit
  503.    end
  504.  
  505.    address command 'delete >NIL: RAM:schd.temp'
  506.  
  507.    if dates = 1 then do
  508.       do j=1 to ct
  509.          if dateweeks.j = startdate then do
  510.             say j-1
  511.             do i=1 to j-1
  512.                tdateweeks.i = dateweeks.i
  513.             end
  514.             k = 1
  515.             do i=j to ct
  516.                dateweeks.k = dateweeks.i
  517.                k = k + 1
  518.             end
  519.             do i=1 to j-1
  520.                dateweeks.k = tdateweeks.i
  521.                k = k + 1
  522.             end
  523.             leave
  524.          end
  525.       end
  526.    end
  527.  
  528.    if open(outfile,league_file || output_file,"w") then do
  529.       writeln(outfile,"*")
  530.       writeln(outfile,"**" league_title)
  531.       writeln(outfile,"*")
  532.       writeln(outfile,"*")
  533.  
  534.       matches = 0
  535.       do i=1 to ct
  536.          if weeks = 1 then
  537.             writeln(outfile,"*Week: "dateweeks.i)
  538.          if dates = 1 then do
  539.             mnth = substr(dateweeks.i,3,2)
  540.             ndate= substr(dateweeks.i,5,4)||mnth||substr(dateweeks.i,1,2)
  541.             weekd= date('w',ndate,'s')
  542.             writeln(outfile,"*Date: "weekd" "substr(dateweeks.i,1,2)" "word(months,mnth)" "substr(dateweeks.i,5,4))
  543.          end
  544.          writeln(outfile,"*")
  545.  
  546.          do k=1 to counter
  547.             do j=1 to counter
  548.                do l=1 to sch
  549.                   if l=1 then sdate = word(schedules2.k,j)
  550.                   if l=2 then sdate = word(schedules4.k,j)
  551.                   if l=3 then sdate = word(schedules6.k,j)
  552.                   if l=4 then sdate = word(schedules8.k,j)
  553.                   if l=5 then sdate = word(schedules0.k,j)
  554.                   if dateweeks.i = sdate then do
  555.                      writech(outfile,left(teams.k,30))
  556.                      writeln(outfile," __   __ " teams.j)
  557.                      matches = matches + 1
  558.                      leave
  559.                   end
  560.                end
  561.             end
  562.          end
  563.          writeln(outfile,"*")
  564.       end
  565.       writeln(outfile,"*")
  566.       close(outfile)
  567.    end
  568.    else do
  569.       say
  570.       say "ERROR :    (Scheduler)"
  571.       say
  572.       say "Unable to write to '"league_file || output_file"'."
  573.       say
  574.       say
  575.       say "The definition file, '"league_file || input_file"', has been created."
  576.       exit
  577.    end
  578. end
  579.                                           /* Manual Schedule creation */
  580. if autos = 0 then do
  581.    if open(outfile,league_file || output_file,"w") then do
  582.       writeln(outfile,"*")
  583.       writeln(outfile,"**" league_title)
  584.       writeln(outfile,"*")
  585.       writeln(outfile,"*")
  586.  
  587.       plyo = playo                    /* this handles playing odd times each team */
  588.       if pos(playo,oddnums) > 0 then
  589.          plyo = plyo + 1
  590.  
  591.       increm = plyo / 2
  592.       matches = 0
  593.       do k=1 to increm
  594.          do i=1 to tcount
  595.             do j=1 to tcount
  596.                if j~=i then do
  597.                    writech(outfile,left(teams.i,30))
  598.                    writeln(outfile," __   __ " teams.j)
  599.                    matches = matches + 1
  600.                end
  601.             end
  602.             writeln(outfile,"*")
  603.             if i ~= tcount then
  604.                writeln(outfile,"*")
  605.          end
  606.       end
  607.       writech(outfile,"*")
  608.       close(outfile)
  609.    end
  610.    else do
  611.       say
  612.       say "ERROR :    (Scheduler)"
  613.       say
  614.       say "Unable to write to '"league_file || output_file"'."
  615.       say
  616.       say
  617.       say "The definition file, '"league_file || input_file"', has been created."
  618.       exit
  619.    end
  620. end
  621.  
  622. if exists(league_file||output2_file) = 0 then do
  623.    if open(outfile,league_file || output2_file,"w") then do
  624.       writeln(outfile,title""league_title)
  625.       do i=1 to tcount
  626.          writeln(outfile,"*TEAM="teams.i)
  627.          writeln(outfile,"*PLY=0")
  628.          writeln(outfile,"*WIN=0")
  629.          writeln(outfile,"*DRW=0")
  630.          writeln(outfile,"*LST=0")
  631.          writeln(outfile,"*GOF=0")
  632.          writeln(outfile,"*GOA=0")
  633.          if i = tcount then
  634.             writech(outfile,"*PTS=0")
  635.          else
  636.             writeln(outfile,"*PTS=0")
  637.       end
  638.       close(outfile)
  639.    end
  640.    else do
  641.       say
  642.       say "ERROR :    (Scheduler)"
  643.       say
  644.       say "Cannot create '"league_file || output2_file"'."
  645.       say
  646.       say
  647.       say "The definition file, '"league_file || input_file"', has been created."
  648.       exit
  649.    end
  650. end
  651.                                          /* create report */
  652. select
  653.    when playo = 2 then playo = 'Twice'
  654.    otherwise
  655.       playo = playo || ' times.'
  656. end
  657.  
  658.  
  659. /* ..and after all files have been created, lets clear up any previous... */
  660.  
  661. if exists(league_file||delput_file) > 0 then
  662.    address command 'c:Delete >NIL: 'league_file||delput_file
  663.  
  664.  
  665. say
  666. say center("Report for '"league_title"'",78)
  667. say "-------------------------------------------------------------------------------"
  668. say "                                               Created "date('e')" at "time()
  669. say
  670. say "Author : "author
  671. say "Version: "fversion
  672. say "_______________________________________________________________________________"
  673. say
  674. say "Number of teams   : "tcount"                  Number of matches : "matches
  675. say
  676. say "Win   : "ptswin" pts.            Teams Relegated : "reg
  677. say "Draw  : "ptsdrw" pts.            Play Each Team  : "playo
  678. say "Lose  : "ptslse" pts.            Points Per Goals: "ptsgls
  679. say "                          Teams Promoted  : "promo
  680. say
  681. say "Number of Divisions : "ndivs"   (including this league)"
  682. say "Other Divisions     : "divs
  683. say
  684. if autos = 1 then do
  685.    say "Automatic Schedule created from '"autofile||input2_file"'."
  686.    say
  687. end
  688. /*
  689. if matches > 999 then
  690.    say "*   The number of matches exceeds 1000. 'Sortsched' can't handle it!!    *"
  691. */
  692. say "_______________________________________________________________________________"
  693. say
  694. say "Team Listing: "
  695. say "-------------"
  696. say
  697. do i=1 to tcount
  698.    say teams.i
  699. end
  700. say
  701. say "-------------------------------------------------------------------------------"
  702. say
  703.  
  704. exit